#pragma once
#ifndef KINEMATICMOTION_H
#define KINEMATICMOTION_H

#include <tsg.h>
using namespace tsg;

class CKineticMotion: public Controller<Vector3>
{
public:
	float m_mass;
	Vector3 m_initialPosition;
	Vector3 m_initialVelocity;
	Parameter<float> m_time;
	float m_step;

private:
	float y[6];
	float dydt[6];
	float m_previousTime;
	bool m_initialise;

public:
	CKineticMotion(void): m_mass(1), m_initialPosition(0, 0, 0), m_initialVelocity(10, 10, 10), m_time(this, 0), m_previousTime(0), m_step(0.01), m_initialise(false){}
	~CKineticMotion(void){}

private:
	void doUpdate();
	void calculDerivative();
	void calculPosition();
};

#endif